<template>
  <bpmn-viewer :flowData="flowData" :procInsId="procInsId" />
</template>

<script>
import BpmnViewer from "@/components/Process/viewer";
import { flowXmlAndNode } from "@/api/flowable/workflow";
export default {
  name: "flowViewer",
  props: {
    bizId: {
      type: Number,
      default: null,
    },
    bizType: {
      type: String,
      default: null,
    },
  },
  components: {
    BpmnViewer,
  },
  data() {
    return { flowData: {} };
  },
  mounted() {
    flowXmlAndNode({
      bizId: this.bizId,
      bizType: this.bizType,
    }).then((res) => {
      this.flowData = res.data;
    });
  },
};
</script>

<style scoped></style>
